// src\api\auth\index.ts
import { request } from '@/utils/request'
// import {
//   ListParams,
//   GetQuoteRecordResponseData,
//   CreateRequestDatas,
//   UpdateRequestDatas,
//   deleteRequestDatas
// } from './types'
import * as types from './types'

export function getListApi(params: types.ListParams) {
  return request<types.GetQuoteRecordResponseData>({
    url: '/quote/getList',
    method: 'get',
    params
  })
}

export function getDetailApi(params: object) {
  return request({
    url: '/quote/getDetail',
    method: 'get',
    params
  })
}
export function doAddApi(data: types.CreateRequestDatas) {
  return request<types.CreateResponseData>({
    url: '/quote/doAdd',
    method: 'post',
    data
  })
}

export function doUpdateApi(data: types.UpdateRequestDatas) {
  return request<types.UpdateRecordResponseData>({
    url: '/quote/doUpdate',
    method: 'put',
    data
  })
}

export function doUpdateByCompanyApi(data: types.updateByCompanyRequestDatas) {
  return request<types.updateByCompanyResponseData>({
    url: '/quote/updateByCompany',
    method: 'put',
    data
  })
}

export function doDeleteApi(data: types.deleteRequestDatas) {
  return request<types.deleteRecordResponseData>({
    url: '/quote/doDelete',
    method: 'delete',
    data
  })
}

export function getFinishCountApi(params: types.FinishCountParams) {
  return request<types.FinishCountResponseData>({
    url: '/quote/getFinishCount',
    method: 'get',
    params
  })
}
